package com.faxsun.profile.core.dao;

import java.util.List;

import com.faxsun.profile.core.domain.FSCustomer;
import com.faxsun.profile.core.domain.FSThirdPartyCustomer;

public interface FSThirdPartyCustomerDao {
	public FSThirdPartyCustomer create3thCustomerByUid(String uid);
	
	public FSThirdPartyCustomer readCustomer3thByUid(String uid);
	
	public boolean check3thCustomerByUid(String uid);

	public List<FSCustomer> readCustomerBy3thUid(String uid);
	
	public FSThirdPartyCustomer save(FSThirdPartyCustomer customer3th);
	
	public List<FSThirdPartyCustomer> readThirdPartyCustomerForCustomer(Long customerId);
	
	/**
	 * 根据channelId和用户Id查找第三方绑定账号
	 * @param customerId
	 * @param channelId
	 * @return
	 */
	public FSThirdPartyCustomer findCustomer3thByCustomerAndChannel(Long customerId, String channelId);
	
	/**
	 * 根据unionId
	 * @param unionId
	 * @return
	 */
	public FSCustomer findCustomer3thByUnionId(String unionId);
	
	/**
	 * 删除customer3th对应的记录
	 * @param customer3th
	 */
	public void delete(FSThirdPartyCustomer customer3th);

}
